
<html>
<head>

    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/> 
    <title>微信支付样例-支付</title>
   
   
     {:think\\Hook::listen('jssdk',$myJssdk,null,true);}
    <script src="__JS__/jquery.min.js?v=2.1.4"></script>
</head>

<body>
    
    <div align="center">
        <button style="width:210px; height:50px; border-radius: 15px;background-color:#FE6714; border:0px #FE6714 solid; cursor: pointer;  color:white;  font-size:16px;" type="button" onclick="callpay()" >立即支付</button>
    </div>
</body>

<script type="text/javascript">
        function callpay() {
           
             wx.chooseWXPay({                    // 调起支付
              timestamp: '{$jsApiParameters.timeStamp}', 
              nonceStr: '{$jsApiParameters.nonceStr}', 
              package:'{$jsApiParameters.package}', 
              signType: '{$jsApiParameters.signType}', 
              paySign: '{$jsApiParameters.paySign}', 
              success: function (res) {
                  callback(extra);
              },
              error : function() {
                  alert('支付失败');
              }
          });
        
        }
    </script>


</html>

